package com.appwoo.txtws.app;

import android.graphics.ColorMatrix;
import android.graphics.ColorMatrixColorFilter;
import android.graphics.drawable.Drawable;
import android.view.MotionEvent;
import android.view.View;
import android.view.View.OnFocusChangeListener;
import android.view.View.OnTouchListener;
import android.widget.ImageButton;
import android.widget.ImageView;

public class UIStyle
{
  public static final float[] BT_DARK;
  public static final float[] BT_NOT_SELECTED;
  public static final float[] BT_SELECTED = { 2.0F, 0.0F, 0.0F, 0.0F, 2.0F, 0.0F, 2.0F, 0.0F, 0.0F, 2.0F, 0.0F, 0.0F, 2.0F, 0.0F, 2.0F, 0.0F, 0.0F, 0.0F, 1.0F, 0.0F };
  public static final View.OnFocusChangeListener buttonOnFocusChangeListener = new View.OnFocusChangeListener()
  {
    public void onFocusChange(View paramAnonymousView, boolean paramAnonymousBoolean)
    {
      if (paramAnonymousBoolean)
      {
        paramAnonymousView.getBackground().setColorFilter(new ColorMatrixColorFilter(UIStyle.BT_SELECTED));
        paramAnonymousView.setBackgroundDrawable(paramAnonymousView.getBackground());
        return;
      }
      paramAnonymousView.getBackground().setColorFilter(new ColorMatrixColorFilter(UIStyle.BT_NOT_SELECTED));
      paramAnonymousView.setBackgroundDrawable(paramAnonymousView.getBackground());
    }
  };
  public static final View.OnTouchListener buttonOnTouchListener = new View.OnTouchListener()
  {
    public boolean onTouch(View paramAnonymousView, MotionEvent paramAnonymousMotionEvent)
    {
      if (paramAnonymousMotionEvent.getAction() == 0)
      {
        paramAnonymousView.getBackground().setColorFilter(new ColorMatrixColorFilter(UIStyle.BT_SELECTED));
        paramAnonymousView.setBackgroundDrawable(paramAnonymousView.getBackground());
      }
      while (true)
      {
        return false;
        if (paramAnonymousMotionEvent.getAction() == 1)
        {
          paramAnonymousView.getBackground().setColorFilter(new ColorMatrixColorFilter(UIStyle.BT_NOT_SELECTED));
          paramAnonymousView.setBackgroundDrawable(paramAnonymousView.getBackground());
        }
      }
    }
  };
  public static final ColorMatrix cm;

  static
  {
    BT_NOT_SELECTED = new float[] { 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 1.0F, 0.0F };
    BT_DARK = new float[] { 2.0F, 0.0F, 0.0F, 0.0F, 2.0F, 0.0F, 2.0F, 0.0F, 0.0F, 2.0F, 0.0F, 0.0F, 2.0F, 0.0F, 2.0F, 0.0F, 0.0F, 0.0F, 1.0F, 0.0F };
    cm = new ColorMatrix();
    cm.setSaturation(0.0F);
  }

  public static final void setButtonFocusChanged(View paramView)
  {
    paramView.setOnTouchListener(buttonOnTouchListener);
    paramView.setOnFocusChangeListener(buttonOnFocusChangeListener);
  }

  public static void setDarkColor(ImageButton paramImageButton)
  {
    paramImageButton.getBackground().setColorFilter(new ColorMatrixColorFilter(cm));
    paramImageButton.setBackgroundDrawable(paramImageButton.getBackground());
  }

  public static void setDarkColor(ImageView paramImageView)
  {
    paramImageView.getDrawable().setColorFilter(new ColorMatrixColorFilter(cm));
    paramImageView.setImageDrawable(paramImageView.getDrawable());
  }

  public static void setOriginalColor(ImageButton paramImageButton)
  {
    paramImageButton.getBackground().setColorFilter(new ColorMatrixColorFilter(BT_NOT_SELECTED));
    paramImageButton.setBackgroundDrawable(paramImageButton.getBackground());
  }

  public static void setOriginalColor(ImageView paramImageView)
  {
    paramImageView.getDrawable().setColorFilter(new ColorMatrixColorFilter(BT_NOT_SELECTED));
    paramImageView.setImageDrawable(paramImageView.getDrawable());
  }
}

/* Location:           C:\Documents and Settings\Administrator\classes_dex2jar.jar
 * Qualified Name:     com.appwoo.txtws.app.UIStyle
 * JD-Core Version:    0.6.2
 */